SCADA systems, such as Motorola's INTRAC and MOSCAD systems provide remote control of a remote terminal unit (RTU) from a central unit over a radio link. The RTU may directly control the system which is being supervised and controlled, for example an irrigation system, by direct connection between the RTU and relays, sensors and other elements of the system under control.
For greater capacity, the RTU can supervise and control the system via one or more terminal units. A number of terminal units can be connected to a single RTU. Each terminal unit can control a number of elements or receive data from a number of elements. Thus there is greater pan-out between the RTU and the elements of the system being supervised and controlled.
A serial radio communications link can be provided between the RTU and the terminal units and there is a need for an efficient protocol on this link. In such an arrangement, the RTU is a "master" and the terminal unit is a "slave".
There is a need for an efficient protocol for communication between the master and the slave.
In serial protocols, it is common to provide a first byte containing address information and a second byte containing control information. It is also common for one of the bits of the control byte to be an expansion bit indicating the presence or absence of a third byte for an expansion address. Thus, in an 8-bit arrangement, 2 bytes can be used to address 256 addresses and by using a third byte when required, up to 64 K of addresses can be accommodated. Such an arrangement can be efficient in only using 2 bytes when possible and only expanding to a third byte when necessary.
On the other hand, in a system that typically requires, say, 1,000 addresses, the aforementioned arrangement does not provide any significant efficiency, because the third byte would almost always be required, yet would not always be fully utilised. Merely using some of the bits of the second byte as address bits reduces the amount of control information available. This last arrangement is inadequate.
There is a need for an improved serial communications protocol.
According to the present invention, a method of communications between a master unit and a slave unit of a supervisory control and data acquisition system is provided comprising the steps of sending at least two bytes of data from the master unit to the slave unit, where the first byte is an address byte containing address information for addressing the slave unit and the second byte is a control byte containing an expansion bit and two address/type variable bits to be interpreted by the slave according to a rule set. The rule set is as follows: if an expansion bit of the control byte is set, then a third byte is to be expected containing address information for addressing the slave unit and the two variable bits contain type information; whereas if the expansion bit is not set, then no third byte is to be expected and the variable bits contain address information; and if the variable bits are type information then a first state of these bits indicates a broadcast message and a second state indicates a different message. The method further comprises the step of receiving the at least two bytes of data, decoding these bytes, applying the rule set, receiving the third byte if required by the rule set, comparing the address information in the first byte and, selectively, the variable bits and the third byte as required by the rule set with the address of the slave.
In a preferred embodiment, the first byte comprises 8 bits of slave address and the second byte comprises 1 expansion bit, 2 variable address/type bits and 5 control bits. In this manner, 1,000 slave addresses can be accommodated without extending to a third byte. At the same time, if the protocol is expanded to the third byte, 2 of the bits which have been used for address bits in the second byte can now be used for control information. In particular, these bytes can indicate that the message type is a broadcast message. At the same time, even if the third byte is not used, control information representing that the message is a broadcast type need not be lost, because a broadcast type of call can be indicated by providing a system address in the first byte.
Thus, a particularly efficient protocol is provided which accommodates a large number of slave addresses without frequently reverting to a third byte and yet maintains the ability to indicate a broadcast type of call without further use of the valuable remaining bits of the second (control) byte.